<?
	$usr = $this->usr;
	global $usr_groups;
?>
	<div style="margin:5px" class="helvetica">
		<table border="0" cellpadding="5" cellspacing="0">
			<tbody>
				<tr>
					<td align="right">
						Name:
					</td>
					<td>
					<? if($usr->class == 'Root'){ ?>
						root
					<? }else{ ?>
						<input type="text" id="usrname" value="" style="width:30em" onchange="flagChange()" />
					<? } ?>
					</td>
				</tr>
				<tr>
					<td align="right">
						Email: 
					</td>
					<td>
						<input type="text" id="usremail" value="" style="width:30em" onchange="flagChange()" />
					</td>
				</tr>
				<tr>
					<td align="right">
						New password? 
					</td>
					<td>
						<input type="password" id="usrpass" value="" style="width:30em" onchange="$('up2').appear(); flagChange();" />
					</td>
				</tr>
				<tr id="up2" style="display:none">
					<td align="right">
						Confirm password: 
					</td>
					<td>
						<input type="password" id="usrpass2" value="" style="width:30em" onchange="" />
					</td>
				</tr>
				<tr>
					<td align="right">
						Class: 
					</td>
					<td>
						<? if($usr->class == 'Root'){ ?> 
							Root
						<? }else{ ?>
						<select id="usrclass" onchange="flagChange()">
							<option>User</option>
							<option<? if($usr->is_sudoer) echo ' selected="selected"'; ?>>Sudoer</option>
						</select>
						<? } ?>
					</td>
				</tr>
				<tr<? if($usr->class == 'Root'){ ?> style="display:none"<? } ?>>
					<td align="right" valign="top">
						Groups: <br />
					</td>
					<td>
						<div class="infobox">
							<input type="button" onclick="Groups.browse();" value="Add New..." />
							<div style="padding:4px; font-size:1.2em; text-align:right">
								<span style="font-size:0.8em">Primary:</span> <strong id="gpname"></strong><br />
								<span id="usrgroups"></span> 
							</div>
						</div>
					</td>
				</tr>
				<tr>
					<td align="right" valign="top">
						Home SMRDE Domain:
					</td>
					<td>
						<div class="infobox">
							<div style="padding:4px; font-size:1.2em; text-align:right">
								<strong id="usrdom"></strong> 
								&nbsp;<a style="font-size:0.8em" href="javascript:Domains.browse()">change</a>
							</div>
						</div>
					</td>
				</tr>
				<tr<? if($usr->class !== 'Sudoer'){ ?> style="display:none"<? } ?>>
					<td align="right" valign="top">
						Sudo Permissions: <br />
					</td>
					<td>
						<input type="checkbox" id="usr_can_script" value="1" onchange="flagChange()" /> can_script
						<br />
						<input type="checkbox" id="usr_can_apache" value="1" onchange="flagChange()" /> can_apache
						<br />
						<input type="checkbox" id="usr_can_symlink" value="1" onchange="flagChange()" /> can_symlink
					</td>
				</tr>
			</tbody>
		</table>
	</div>